#ifndef MACROS_H
#define MACROS_H
/** MEMORY ALLOCATION MACROS
Handles differences between Macintosh, UNIX, and MS Windows.
**/

#include <memory.h>
#include <malloc.h>

#define MALLOCARGTYPE 	unsigned

/*
	NOTE for MS WINDOWS 3.0
	This application is a PIG.  It locks its global data so that it will
	not be moved between messages.
*/

#ifdef _Windows
#define ALLOC_RECORDS(PTR,TYPE,NUM) \
	{ \
	GLOBALHANDLE hGlobalMem; \
	if ((hGlobalMem = GlobalAlloc (GPTR, (NUM+1)*sizeof(TYPE))) == NULL) \
		REPORT_ERROR (ERR_MALLOC);\
		else PTR = (TYPE *) ((65536L % sizeof(TYPE)) +\
							 GlobalLock(hGlobalMem)); \
	}
#endif
#endif
